#include "cardsetmove.h"
#include "QtGlobal"

int ran=0;
void generateRandomNumber()
{
    srand(QTime(0,0,0).secsTo(QTime::currentTime()));
    for(int i=0; i<10; i++)
    {
        int test =rand()%10;
        ran=test;
    }
}
cardsetmove::cardsetmove(QWidget *parent)
{

    this->setGeometry(0,0,50,150);//设置卡牌控件的大小
}
cardsetmove::~cardsetmove(){

}

    void cardsetmove::paintEvent(QPaintEvent *ev){
    int pos=0;
    pos=ran;
    QString pictures[10]={":/res/sha_common.png",":/res/sha_fire.jpg",":/res/sha_thunder.png",};
    QPainter *painter =new QPainter(this);
     QPixmap pixmap;
     pixmap.load(pictures[pos]);
}

